package com.company;

import java.util.Scanner;

/**
 * @author jrue
 * @version 1.0
 * @date 2020/3/19 15:40
 */
public class Main10 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        StringBuilder sb = new StringBuilder();

        for (int i = 0; i < s.length(); i++) {
            if ( Character.isUpperCase(s.charAt(i))) {
                if (i == 0) {
                    sb.append(Character.toLowerCase(s.charAt(i)));
                } else {
                    sb.append("_").append(Character.toLowerCase(s.charAt(i)));
                }

            } else {
                sb.append(s.charAt(i));
            }
        }
        System.out.println(sb.toString());
    }

}
